﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Think.Lenovo.Com.DataAccess
{
    public class NewsClass
    {
        public static Dictionary<int, string> GetNewsClass(int role)
        {
            Dictionary<int, string> dic = new Dictionary<int, string>();
            if(role==1)
            {
                dic.Add(1,"总部资讯");
                dic.Add(2, "分区资讯");
                dic.Add(3, "市场活动");
                dic.Add(4, "奖励政策");
                dic.Add(5, "会员手册");
                dic.Add(6, "成功案例");
                dic.Add(7, "常见问题");
                dic.Add(8, "招募成功案例");
            }
            else
            {
                dic.Add(2, "分区资讯");
                dic.Add(3, "市场活动");
                dic.Add(4, "奖励政策");
                dic.Add(6, "成功案例");
            }
            return dic;
        }

        public static string GetNewsClassIdList(int role)
        {
            if(role==1)
            {
                return "1,2,3,4,5,6,7,8";
            }
            else
            {
                return "2,3,4,6";
            }
        }

        public static string GetNewsClassName(int role, int classId)
        {
            Dictionary<int, string> dic = new Dictionary<int, string>();
            dic = GetNewsClass(role);
            if(dic!=null)
            {
                return dic[classId];
            }
            return "";
        }
    }
}
